<script>
/* jQuery->validation */
$(document).ready(function(){
    $("#DatosturnoCancelarForm").validate();
});    
</script>


<div id="titulo_encabezado" style="background: none; border: none;">
	<div style="float: left; padding: 6px; margin-top:10px; font-size: 16px; font-weight: normal;" class="btn btn-large btn-primary disabled">Cancelación de Turnos</div>
</div>

<div style="BORDER-BOTTOM: #efefef 1px solid; BORDER-LEFT: #efefef 1px solid; PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #f1f1f1; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; BORDER-TOP: #efefef 1px solid; BORDER-RIGHT: #efefef 1px solid; PADDING-TOP: 10px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px 5px 5px 5px; margin: 15px;"> 
    Especifique a continuación los datos del Turno que desea Cancelar. Los mismos deben coincidir con los usados al momento de sacar el turno; de lo contrario, no se podrá cancelar el turno en forma online y deberá comunicarse con el Profesional en forma telefónica.
</div>

    <?php echo $this->Form->create('Datosturno', array(
													'url' => array(
																'controller' => 'turnos', 
																'action'     => 'cancelar2'
																),
													'inputDefaults' => array(
																'label' => false,
																'div'   => false
																)
													)); ?>
    <table width='100%'>
        <tr><td colspan="2"><h1 style="BORDER-BOTTOM: #efefef 1px solid; BORDER-LEFT: #efefef 1px solid; PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #f1f1f1; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; BORDER-TOP: #efefef 1px solid; BORDER-RIGHT: #efefef 1px solid; PADDING-TOP: 10px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px 5px 5px 5px; margin: 15px;font-size: 130%;">Datos del Paciente</h1></td></tr>    
        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;width:200px;">Sexo:</td>
            <td>
                <?php echo $this->Form->select('sexo', $lst_sexos , null, array(
																						'escape' => false, 
																						'empty'  => false, 
																						'class'  => 'required'
																					)); ?>
            </td>
        </tr>
        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;">Apellido:</td>
            <td>
                <?php echo $this->Form->input('apellido', array(
															'value' => '', 
															'type'  => 'text', 
															'style' => 'width:240px',
                                                            'empty'  => false,                                                             
															'class' => 'required'
															)); ?>
            </td>
        </tr>

        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;">Nombre:</td>
            <td>
                <?php echo $this->Form->input('nombre', array(
                                                            'value' => '', 
                                                            'type'  => 'text', 
                                                            'style' => 'width:240px',
                                                            'class' => 'required'
                                                            )); ?>
            </td>
        </tr>

        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;">Email:</td>
            <td>
                <?php echo $this->Form->input('email', array(
                                                            'value' => '', 
                                                            'type'  => 'text', 
                                                            'style' => 'width:240px',
                                                            'class' => 'required email'
                                                            )); ?>
            </td>
        </tr>        
        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;">Teléfono:</td>
            <td>
                <?php echo $this->Form->input('telefono', array(
                                                            'value' => '', 
                                                            'type'  => 'text', 
                                                            'style' => 'width:240px',
                                                            'class' => 'required'
                                                            )); ?>
            </td>
        </tr>                
        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;">Fecha de Nacimiento:</td>
            <td>
            <?php 
                for($i=1;$i<=31;$i++){$dia[$i]=$i;}
                echo $this->Form->select('dia', $dia, null, array(
																'escape' => false, 
																'empty'  => '---', 
																'class'  => 'required' 
																));
                for($i=1;$i<=12;$i++){$mes[$i]=$i;}
                echo $this->Form->select('mes', $mes, null, array(
																'escape' => false, 
																'empty'  => '---', 
																'class'  => 'required' 
																));  
                $desde = date("Y",time()) - 110;
                for($i=date("Y",time());$i>$desde;$i--){$ano[$i]=$i;}
                echo $this->Form->select('ano', $ano, null, array(
																'escape' => false, 
																'empty'  => '---', 
																'class'  => 'required'
																));  
                  
            ?>
            </td>
        </tr>
        <tr><td colspan="2"><br/><h1 style="BORDER-BOTTOM: #efefef 1px solid; BORDER-LEFT: #efefef 1px solid; PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #f1f1f1; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; BORDER-TOP: #efefef 1px solid; BORDER-RIGHT: #efefef 1px solid; PADDING-TOP: 10px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px 5px 5px 5px; margin: 15px;font-size: 130%;">Datos del Turno a Cancelar</h1></td></tr>
        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;">Fecha:</td>
            <td>
            <?php 
                for($i=1;$i<=31;$i++){$dia_turno[$i]=$i;}
                echo $this->Form->select('dia_turno', $dia_turno, null, array(
                                                                'escape' => false, 
                                                                'empty'  => '---', 
                                                                'class'  => 'required' 
                                                                ));
                for($i=1;$i<=12;$i++){$mes_turno[$i]=$i;}
                echo $this->Form->select('mes_turno', $mes_turno, null, array(
                                                                'escape' => false, 
                                                                'empty'  => '---', 
                                                                'class'  => 'required' 
                                                                ));  
                $desde = date("Y",time()) - 1;
                for($i=date("Y",time())+ 1;$i>$desde;$i--){$ano_turno[$i]=$i;}
                echo $this->Form->select('ano_turno', $ano_turno, null, array(
                                                                'escape' => false, 
                                                                'empty'  => '---', 
                                                                'class'  => 'required'
                                                                ));  
                  
            ?>
            </td>
        </tr>
        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;">Hora:</td>
            <td>
            <?php 
                for($i=1;$i<=24;$i++){
                    if($i <= 9){
                        $hora[$i]="0".$i;
                    }else{
                        $hora[$i]=$i;
                    }
                }

                echo $this->Form->select('hora', $hora, null, array(
                                                                'escape' => false, 
                                                                'empty'  => '---', 
                                                                'class'  => 'required' 
                                                                ));
                for($i=0;$i<=45;$i=$i+15){
                    if($i <= 9){
                        $minutos[$i]="0".$i;
                    }else{
                        $minutos[$i]=$i;
                    }
                }
                echo $this->Form->select('minutos', $minutos, null, array(
                                                                'escape' => false, 
                                                                'empty'  => '---', 
                                                                'class'  => 'required' 
                                                                ));  
                 
            ?>
            </td>
        </tr>
        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;">Apellido del Profesional:</td>
            <td>
                <?php echo $this->Form->input('apellido_profesional', array(
                                                            'value' => '', 
                                                            'type'  => 'text', 
                                                            'style' => 'width:240px',
                                                            'class' => 'required'
                                                            )); ?>
            </td>
        </tr>  
        <tr>
            <td style="text-align:right; vertical-align:middle;font-size:14px;padding-right:10px;">Nombre del Profesional:</td>
            <td>
                <?php echo $this->Form->input('nombre_profesional', array(
                                                            'value' => '', 
                                                            'type'  => 'text', 
                                                            'style' => 'width:240px',
                                                            'class' => 'required'
                                                            )); ?>
            </td>
        </tr>  
        <tr><td colspan="2">&nbsp;</td></tr>
        <tr>
            <td>&nbsp;</td>
            <td >
                <?php
                    $options = array(
									'label' => 'Enviar Datos',
                                    'class' => 'btn btn-success',
                                    'style' => 'width: 150px',
									'name'  => 'save'
									);
                    echo $this->Form->end($options); 
                ?>
            </td>
        </tr>
    
    </table>

</div>
<div class="clear"> </div>